﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerAnimationController : MonoBehaviour
{
    private Animator _animator;
    private Player _player;
    private bool _isStun;

    private void Start()
    {
        _animator = GetComponent<Animator>();
        _player = GetComponent<Player>();
        _isStun = false;
    }

    private void Update()
    {
        _animator.SetFloat("Velocity", _player.MoveVelocity.magnitude / _player.moveSpeed);
        _animator.SetBool("IsStun", _player.IsStuning);
    }

    public void SetStunState(bool isStun)
    {
        _isStun = isStun;
    }
}
